<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <link rel="shortcut icon" href="favicon.ico">
    <link href="./public/h+/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="./public/h+/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="./public/h+/css/plugins/footable/footable.core.css" rel="stylesheet">
    <link href="./public/h+/css/animate.min.css" rel="stylesheet">
    <link href="./public/h+/css/style.min862f.css?v=4.1.0" rel="stylesheet"> {{literal}}
    <style>
        .avr a {
            background-color: #1AB394 !important;
            color: #fff !important;
        }

        .checkbox input[type=checkbox],
        .checkbox-inline input[type=checkbox],
        .radio input[type=radio],
        .radio-inline input[type=radio] {
            margin-top: 3px;
        }
    </style>
    {{/literal}}
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>用户管理</h5>

                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>

                        </div>
                    </div>
                    <div class="ibox-content">
                        <!-- <form action="index.php" method="get" class="search input-group col-md-12"> -->
                            <!-- <input type="text" name="text" class="form-control text" placeholder="查询">
                            <input type="hidden" name="c" value="user">
                            <input type="hidden" name="a" value="usersearch">
                            <span class="input-group-btn"> -->
                                <!-- <div id="sub" class="btn btn-primary ">查找</div> -->
                                <!-- <input type="submit" value="添加管理员" class="btn btn-primary"> -->
                            <!-- </span> -->
                                <div data-toggle="modal" data-target="#addadmin" class="btn btn-primary pull-right">
                                    添加管理员
                                </div>
                        <!-- </form> -->
                        <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="8">
                            <thead>
                                <tr style="background-color: #fff; color: #000 !important;">

                                    <th data-toggle="true">id</th>
                                    <th>用户名</th>
                                    <th>权限</th>
                                    <!-- <th>邮箱</th>
                                    <th>简介</th>
                                    <th>性别</th> -->
                                    <th>操作</th>

                                   
                                    <!-- <th class="disable">操作</th> -->
                                 
                                </tr>
                            </thead>
                            <tbody>
                                {{foreach $users as $user}}
                                <tr>
                                    <td>{{$user['id']}}</td>
                                    <td>{{$user['user']}}</td>
                                    <td>{{$user['type']}}</td>
                                    <!-- <td>{{$user['email']}}</td>
                                    <td>{{$user['jianjie']}}</td>
                                    <td>{{$user['sex']}}</td>  -->
                                    
                                    {{if $user['id'] == $admin['id']}}
                                        <td>
                                             <!-- default -->
                                            <a data-toggle="modal" data-target="#{{$user['id']}}">
                                                <div data-uid="{{$user['id']}}" class="btn btn-info">修改</div>
                                            </a>
                                        </td>
                                    {{else}}
                                        {{if $admin['perm'] == 1}}
                                            <td>
                                                <a href="index.php?g=back&c=admin&a=remadmin&id={{$user['id']}}">
                                                    <div data-uid="{{$user['id']}}" class="btn btn-info">删除</div>
                                                </a>
                                                <a data-toggle="modal" data-target="#{{$user['id']}}">
                                                    <div data-uid="{{$user['id']}}" class="btn btn-info">修改</div>
                                                </a>
                                            </td>
                                        {{else}}
                                        
                                        <td>
                                            <a>
                                                <div data-uid="{{$user['id']}}" class="btn btn-info">修改</div>
                                            </a>
                                        </td>
                                        {{/if}}
                                    {{/if}}
                                </tr>
                                <!-- href="index.php?c=user&a=userdel&uid={{$user['id']}}&page={{$paging}}" -->
                                {{/foreach}} {{foreach $users as $user}}
                                
                                    <div class="modal inmodal" id="{{$user['id']}}" tabindex="-1" role="dialog" aria-hidden="true">
                                        <div class="modal-dialog modal-sm">
                                            <div class="modal-content animated bounceInRight" style="width: 350px;">
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal">
                                                        <span aria-hidden="true">&times;</span>
                                                        <span class="sr-only">关闭</span>
                                                    </button>
                                                </div><form role="form" action="index.php?c=admin&a=update" method="post">
                                                <div class="modal-body form-horizontal">
                                                    <!-- <label for="" class="input-group">用户名
                                                        <input type="text" value="{{$user['user']}}">

                                                    </label> -->
                                                    <input type="hidden" name="uid" class="form-control" value="{{$user['id']}}">
                                                    <div class="form-group ">
                                                        <label class="control-label">用户名</label>
                                                        <div class="">
                                                            <input type="text" name="user" class="form-control" value="{{$user['user']}}">
                                                        </div>
                                                    </div>
                                                    {{if $admin['perm'] == 1}}
                                                    <div class="form-group ">

                                                        <label class="radio-inline">
                                                            <input type="radio" name="perm" value="1" checked disabled>超级管理员
                                                        </label>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="perm" value="2" disabled>管理员
                                                        </label>
                                                    </div>
                                                    {{else}}
                                                    <div class="form-group ">
                                                    <label class="radio-inline">
                                                        <input type="radio" name="prem" value="1">超级管理员
                                                    </label>
                                                    <label class="radio-inline">
                                                        <input type="radio" name="prem" value="2">管理员
                                                    </label>
                                                    </div>
                                                    {{/if}}
                                                    <div class="form-group ">
                                                        <label class="control-label">密码</label>
                                                        <div class="">
                                                            <input type="password" name="pwd" class="form-control" value="{{$user['user']}}">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="modal-footer">
                                                    <button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
                                                    <!-- <button type="submit" class="" data-skinid="{{$user['id']}}">保存</button> -->
                                                    <input type="submit" value="保存" class="btn btn-primary modify">
                                                </div></form>
                                            </div>
                                        </div>
                                    </div>
                                
                                {{/foreach}}



                                <!-- 添加管理员模态框 -->

                                <div class="modal inmodal" id="addadmin" tabindex="-1" role="dialog" aria-hidden="true">
                                    <div class="modal-dialog modal-sm">
                                        <div class="modal-content animated bounceInRight" style="width: 350px;">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal">
                                                    <span aria-hidden="true">&times;</span>
                                                    <span class="sr-only">关闭</span>
                                                </button>
                                            </div>
                                            <form role="form" action="index.php?c=admin&a=addadmin" method="post">
                                                <div class="modal-body form-horizontal">
                                                    <!-- <label for="" class="input-group">用户名
                                                                                        <input type="text" value="{{$user['user']}}">
                                
                                                                                    </label> -->
                                                    <!-- <input type="hidden" name="uid" class="form-control" value="{{$user['id']}}"> -->
                                                    <div class="form-group ">
                                                        <label class="control-label">用户名</label>
                                                        <div class="">
                                                            <input type="text" name="user" class="form-control" value="" placeholder="输入用户名">
                                                        </div>
                                                    </div>
                                                    
                                                    <div class="form-group ">
                                                        <label class="radio-inline">
                                                            <input type="radio" name="perm" value="1">超级管理员
                                                        </label>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="perm" value="2" checked>管理员
                                                        </label>
                                                    </div>
                                                    <div class="form-group ">
                                                        <label class="control-label">密码</label>
                                                        <div class="">
                                                            <input type="password" name="pwd" class="form-control" value="" placeholder="输入密码">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="modal-footer">
                                                    <button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
                                                    <!-- <button type="submit" class="" data-skinid="{{$user['id']}}">保存</button> -->
                                                    <input type="submit" value="保存" class="btn btn-primary modify">
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>



                            </tbody>
                            <tfoot>
                                <tr>
                                    <td colspan="5">
                                        <!-- <ul class="pagination "></ul> -->


                                        <ul class="pagination pull-right">
                                            {{if $paging == 1}}
                                            <li class="paginate_button previous disabled">
                                                <a href="#">上一页</a>
                                            </li>
                                            {{else}}
                                            <li class="paginate_button previous">
                                                <a href="index.php?c=user&a=userdata&page={{$paging-1}}">上一页</a>
                                            </li>
                                            {{/if}} {{for $i = 0; $i
                                            < $pagesize;$i++}} {{if $i+1==$page}} <li class="paginate_button previous disabled avr">
                                                <a href="#">{{$i+1}}</a>
                                                </li>
                                                {{else}}
                                                <li class="paginate_button previous">
                                                    <a href="index.php?c=user&a=userdata&page={{$i+1}}">{{$i+1}}</a>
                                                </li>
                                                {{/if}} {{/for}} {{if $paging == $pagesize}}
                                                <li class="paginate_button previous disabled">
                                                    <a href="#">下一页</a>
                                                </li>
                                                {{else}}
                                                <li class="paginate_button previous">
                                                    <a href="index.php?c=user&a=userdata&page={{$paging+1}}">下一页</a>
                                                </li>
                                                {{/if}}
                                        </ul>
                                    </td>
                                </tr>
                            </tfoot>
                        </table>

                    </div>
                </div>
            </div>
        </div>

    </div>
    <script src="./public/h+/js/jquery.min.js?v=2.1.4"></script>
    <script src="./public/h+/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="./public/h+/js/plugins/footable/footable.all.min.js"></script>-->
    <script src="./public/h+/js/content.min.js?v=1.0.0"></script>
    <script src="./public/h+/myjs/search.js"></script>


    <script>
        // $(document).ready(function(){$(".footable").footable();$(".footable2").footable()});
    </script>
    <!-- <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script> -->
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_foo_table.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:03 GMT -->

</html>